package cn.com.dycc.sys_manage.area.service;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.com.dycc.sys_manage.area.dao.AreaDao;
import cn.com.dycc.sys_manage.area.entity.AreaResult;

@Service("areaService")
@Transactional(rollbackFor=Exception.class)
public class AreaServiceImpl implements AreaService{
	
	@Resource(name="areaDao")
	private AreaDao areaDao;
	
	//
	public List<AreaResult> findListArea(String org_id) throws NotFoundAreaException {
		List<AreaResult> list = new ArrayList<AreaResult>(); 
		try {
			list = areaDao.findListArea(org_id);
		} catch (Exception e) {
			e.printStackTrace();
			throw new NotFoundAreaException("查询失败！稍后重试");
		}	
				
		return list;
	}

}
